<?php require_once(dirname(__FILE__).'/inc/config.inc.php');IsModelPriv('infolist_add'); ?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0,user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>添加列表信息</title>
<link href="templates/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" charset="utf-8" src="templates/js/jquery-1.11.2.min.js"></script>
<script type="text/javascript" charset="utf-8" src="templates/js/jquery.nicescroll.js"></script>
<script type="text/javascript" charset="utf-8" src="templates/js/Validform_v5.3.2_min.js"></script>
<script type="text/javascript" charset="utf-8" src="templates/js/laymain.js"></script>
<script type="text/javascript" charset="utf-8" src="templates/js/common.js"></script>
<script type="text/javascript" src="templates/js/getuploadify.js"></script>
<script type="text/javascript" src="templates/js/getinfosrc.js"></script>
<script type="text/javascript" src="plugin/colorpicker/colorpicker.js"></script>
<script type="text/javascript" src="plugin/calendar/calendar.js"></script>
<script type="text/javascript" src="../plugin/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="../plugin/ueditor/ueditor.all.min.js"></script>

<script type="text/javascript">
    $(function () {
        //初始化表单验证
        $("#form").initValidform();
    });
</script>
</head>

<body class="mainbody">
<form name="form" id="form" method="post" action="infolist_save.php" >

<!--导航栏-->
<div class="location">
  <a href="javascript:history.back(-1);" class="back"><i></i><span>返回列表页</span></a>
  <a href="home.php" class="home"><i></i><span>首页</span></a>
  <i class="arrow"></i>
  <a href="javascript:history.back(-1);"><span>内容管理</span></a>
  <i class="arrow"></i>
  <span>编辑内容</span>
   <a href="javascript:location.reload();" class="reload">刷新</a>
</div>
<div class="line10"></div>
<!--/导航栏-->

<!--内容-->
<div id="floatHead" class="content-tab-wrap">
  <div class="content-tab">
    <div class="content-tab-ul-wrap">
      <ul>
        <li><a class="selected" href="javascript:;">基本信息</a></li>
        <li><a href="javascript:;">详细描述</a></li>
        <li><a href="javascript:;">SEO选项</a></li>
      </ul>
    </div>
  </div>
</div>

<div class="tab-content">
  <dl>
    <dt>所属类别</dt>
    <dd>
      <div class="rule-single-select">
        <select name="classid" id="classid" datatype="n1-16" sucmsg=" " errormsg="请选择栏目！">
		<option value="-1">请选择类别...</option>
			<?php CategoryMyType(1); ?>
		</select>
      </div>
    </dd>
  </dl>
  <dl>
    <dt>显示状态</dt>
    <dd>
      <div class="rule-multi-radio">
        <span id="checkinfo"><input id="checkinfo_1" type="radio" name="checkinfo" value="true" checked="checked" /><label for="checkinfo_1">审核</label>
		<input id="checkinfo_2" type="radio" name="checkinfo" value="false" /><label for="checkinfo_2">未审</label>
		</span>
      </div>
    </dd>
  </dl>
  <dl>
    <dt>属性</dt>
    <dd>
      <div class="rule-multi-checkbox" id="flagss">
		<?php
			echo GetFlagClass($cid);
		?>
      </div>
    </dd>
  </dl>
  <dl>
    <dt>内容标题</dt>
    <dd>
      <input name="title" type="text" value="" id="title" class="input normal" datatype="*1-255" sucmsg=" " />
      <span class="Validform_checktip">*标题最多255个字符</span>
    </dd>
  </dl>
  
  <dl>
    <dt>封面图片</dt>
    <dd>
     <input name="picurl" type="text" id="picurl" class="input normal" value="" /> <div class="upload-box upload-img">
	<div class="webuploader-pick"  onmousemove="this.className='webuploader-pick webuploader-pick-hover'" onmouseout="this.className='webuploader-pick'" onclick="GetUploadify('uploadify','缩略图上传','image','image',1,<?php echo $cfg_max_file_size; ?>,'picurl')">浏览...</div> 
	<span class="rePicTxt">
	<input type="checkbox" name="rempic" id="rempic" value="true" />
	远程</span></div>
    </dd>
  </dl>

  <dl>
    <dt>排序数字</dt>
    <dd>
      <input name="orderid" type="text" value="<?php echo GetOrderID('#@__infolist'); ?>" id="orderid" class="input small" datatype="n" sucmsg=" " />
      <span class="Validform_checktip">*数字，越小越向前</span>
    </dd>
  </dl>
  <dl>
    <dt>浏览次数</dt>
    <dd>
      <input name="hits" type="text" value="0" id="hits" class="input small" datatype="n" sucmsg=" " />
      <span class="Validform_checktip">点击浏览该信息自动+1</span>
    </dd>
  </dl>
  <dl id="div_albums_container">
    <dt>图片相册</dt>
    <dd>
      <div class="webuploader-pick"  onmousemove="this.className='webuploader-pick webuploader-pick-hover'" onmouseout="this.className='webuploader-pick'" onclick="GetUploadify('uploadify2','组图上传','image','image',50,<?php echo $cfg_max_file_size; ?>,'picarr','picarr_area')">批量上传</div>
      <div class="photo-list">
        <ul  id="picarr_area">
          	
        </ul>
      </div>
    </dd>
  </dl>
  <div id="df">
      <?php if(isset($cid)) echo GetDiyField(1,$cid); ?>
  </div>
  <dl>

  
  <dl>
    <dt>发布时间</dt>
    <dd>
      <input name="posttime" type="text" value="<?php echo GetDateTime(time()); ?>" id="posttime" class="input rule-date-input"  datatype="/^\s*$|^\d{4}\-\d{1,2}\-\d{1,2}\s{1}(\d{1,2}:){2}\d{1,2}$/" errormsg="请选择正确的日期" sucmsg=" " />
      <span class="Validform_checktip">不选择默认当前发布时间</span>
	<script type="text/javascript">
				date = new Date();
				Calendar.setup({
					inputField     :    "posttime",
					ifFormat       :    "%Y-%m-%d %H:%M:%S",
					showsTime      :    true,
					timeFormat     :    "24"
				});
				</script>
    </dd>
  </dl>
  
  
</div>



<div class="tab-content" style="display:none">

  <dl>
    <dt>跳转链接</dt>
    <dd>
      <input name="linkurl" type="text" maxlength="255" id="linkurl" value="" class="input normal" />
      <span class="Validform_checktip">填写后直接跳转到该网址</span>
    </dd>
  </dl>
  <dl id="div_source">
    <dt><span id="div_source_title">信息来源</span></dt>
    <dd>
      <input name="source" type="text" value="" id="source" class="input " />
      <span id="div_source_tip" class="Validform_checktip">非必填，最多50个字符</span>
    </dd>
  </dl>
  <dl id="div_author">
    <dt><span id="div_author_title">文章作者</span></dt>
    <dd>
      <input name="author" type="text" id="author" value="<?php echo GetAuthor(); ?>" class="input normal" datatype="s0-50" sucmsg=" " />
      <span id="div_author_tip" class="Validform_checktip">非必填，最多50个字符</span>
    </dd>
  </dl>
  <dl>
    <dt>内容摘要</dt>
    <dd>
      <textarea name="description" id="description" class="input" datatype="*0-255" sucmsg=" "></textarea>
      <span class="Validform_checktip">不填写则自动截取内容前255字符</span>
    </dd>
  </dl>
  <dl>
    <dt>内容描述</dt>
    <dd>
		<!-- 加载编辑器的容器 -->

	  <textarea name="content" id="content" ></textarea>

			<script type="text/javascript">
			 var ue = new UE.ui.Editor({initialFrameWidth:667,
						initialFrameHeight:280,
						wordCount:false});
				 ue.render('content');
			</script>
				<div class="editToolbar">
					<input type="checkbox" name="remote" id="remote" value="true" />
					下载远程图片和资源
					&nbsp;
					<input type="checkbox" name="autothumb" id="autothumb" value="true" />
					提取第一个图片为缩略图
					&nbsp;
					<input type="checkbox" name="autopage" id="autopage" value="true" />
					自动分页
					<input type="text" name="autopagesize" id="autopagesize" value="5" size="6" class="inputls" />
					KB</div>
    </dd>
  </dl>
</div>

<div class="tab-content" style="display:none">
  <dl>
    <dt>SEO标题</dt>
    <dd>
      <input name="SeoTitle" type="text" value="" maxlength="255" id="SeoTitle" class="input normal" datatype="*0-100" sucmsg=" " />
      <span class="Validform_checktip">255个字符以内</span>
    </dd>
  </dl>
  <dl>
    <dt>SEO关健字</dt>
    <dd>
      <textarea name="keywords"  id="keywords" class="input" datatype="*0-255" sucmsg=" "></textarea>
      <span class="Validform_checktip">以“,”逗号区分开，255个字符以内</span>
    </dd>
  </dl>
  <dl>
    <dt>SEO描述</dt>
    <dd>
      <textarea name="description"  id="description" class="input" datatype="*0-255" sucmsg=" "></textarea>
      <span class="Validform_checktip">255个字符以内</span>
    </dd>
  </dl>
</div>
<!--/内容-->

<!--工具栏-->
<div class="page-footer">
  <div class="btn-wrap">
    <input type="submit" name="btnSubmit" value="提交保存" id="btnSubmit" class="btn" />
    <input name="btnReturn" type="button" value="返回上一页" class="btn yellow" onclick="javascript:history.back(-1);" />
<input type="hidden" name="action" id="action" value="add" />
		<input type="hidden" name="cid" id="cid" value="<?php echo ($cid = isset($cid) ? $cid : ''); ?>" />
  </div>
</div>
<!--/工具栏-->

</form>
</body>
</html>